<html>
<head><meta charset="utf-8"><title>overlapping mutable slices · t-lang/wg-unsafe-code-guidelines · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/index.html">t-lang/wg-unsafe-code-guidelines</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html">overlapping mutable slices</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="158041777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158041777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158041777">(Feb 11 2019 at 16:09)</a>:</h4>
<p>I know that two mutable references to the same value are insta-UB, but do overlapping references have the same behavior?</p>
<div class="codehilite"><pre><span></span>[1, 2, 3]
 ^^^^----- slice_0
    ^^^^-- slice_1
</pre></div>



<a name="158042793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158042793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158042793">(Feb 11 2019 at 16:22)</a>:</h4>
<p>yes</p>



<a name="158042804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158042804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158042804">(Feb 11 2019 at 16:22)</a>:</h4>
<p>"aliasing" is not "equal pointers", it is "overlapping ranges"</p>



<a name="158042809"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158042809" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158042809">(Feb 11 2019 at 16:22)</a>:</h4>
<p>so actually two <code>&amp;mut ()</code> to the same value are fine</p>



<a name="158042943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158042943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158042943">(Feb 11 2019 at 16:24)</a>:</h4>
<blockquote>
<p>two <code>&amp;mut ()</code> to the same value</p>
</blockquote>
<p>I'm not following. How do you have two <code>&amp;mut ()</code> to a value unless the value is itself or contains a <code>()</code>?</p>



<a name="158045184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158045184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158045184">(Feb 11 2019 at 16:50)</a>:</h4>
<p>I think what <span class="user-mention" data-user-id="120791">@RalfJ</span> is saying is that aliasing only occurs when the thing being referenced is a non-empty set.  Since <code>()</code> is always empty, aliasing cannot occur.  If this is so, does this mean that references to <code>PhantomData</code> instances are also OK?  What about anything else that is empty?</p>



<a name="158045679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158045679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158045679">(Feb 11 2019 at 16:57)</a>:</h4>
<p><code>[T; 0]</code> comes to mind.</p>



<a name="158045711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158045711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158045711">(Feb 11 2019 at 16:57)</a>:</h4>
<p>I suppose that the statement "you cannot alias something that takes zero size" seems pretty reasonable</p>



<a name="158053919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158053919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158053919">(Feb 11 2019 at 18:52)</a>:</h4>
<p>What about ownership?  AFAIK, you can't read/write a zero-sized type (someone check me on this, I could be wrong), but the objects are still referenced, so, will there be lifetime problems?</p>



<a name="158063174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158063174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158063174">(Feb 11 2019 at 20:39)</a>:</h4>
<p>I don't follow. "lifetime problem"? sounds like you are talking about references, but you started out with "ownership"?</p>



<a name="158063258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158063258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158063258">(Feb 11 2019 at 20:40)</a>:</h4>
<p>we are specifically talking about references here, and since aliasing is defined as pointing to overlapping ranges, references to ZST cannot really alias</p>



<a name="158064625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158064625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158064625">(Feb 11 2019 at 20:56)</a>:</h4>
<p>I'm sorry, I was being really, really unclear about this.   Consider the following code:</p>
<div class="codehilite"><pre><span></span><span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">d</span>: <span class="kp">&amp;</span><span class="p">[</span><span class="kt">u64</span><span class="p">];</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">a</span>: <span class="p">[</span><span class="kt">u64</span><span class="p">;</span><span class="w"> </span><span class="mi">3</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">];</span><span class="w"></span>
<span class="w">        </span><span class="n">d</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="n">a</span><span class="p">[</span><span class="mi">1</span><span class="p">..</span><span class="mi">1</span><span class="p">];</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="n">println</span><span class="o">!</span><span class="p">(</span><span class="s">&quot;d = {:?}&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">d</span><span class="p">);</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>


<p>Today, this code will not compile because <code>a</code> doesn't live long enough for <code>d</code>.  But <code>d</code> is empty; why <strong>can't</strong> this code compile?  After all, if we can't read or write to this, then does it really matter?  If it's like the mathematical concept of the empty set, then we can treat all empty references as if they are the same object (IIRC, there is one empty set in the universe; all empty sets alias to it).  If it <strong>isn't</strong> like the mathematical concept of the empty set, then there is additional information there, and the scoping rules are correct.  My comment about the 'lifetime problem' included this problem.</p>



<a name="158065430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158065430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158065430">(Feb 11 2019 at 21:06)</a>:</h4>
<p>One thing to keep in mind is that the rules the compiler enforces for safe Rust are only a conservative approximation of the rules governing UB -- safe programs must be UB-free, but not every UB-free program can be written entirely in safe Rust</p>



<a name="158065631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158065631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158065631">(Feb 11 2019 at 21:09)</a>:</h4>
<p><span class="user-mention" data-user-id="202560">@Cem Karan</span> I see. I am not sure I have a good answer for your particular example, but notice that I spoke only about <em>aliasing</em> in particular.</p>



<a name="158065653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158065653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158065653">(Feb 11 2019 at 21:09)</a>:</h4>
<p>to have an <code>&amp;mut T</code>, you must not just make sure that there is no aliasing reference, you must also make sure that it points to a <code>T</code></p>



<a name="158065721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158065721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158065721">(Feb 11 2019 at 21:10)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> You're right, unfortunately for me, my brain tends to skip around a lot, which is how this came to mind.</p>



<a name="158065722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158065722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158065722">(Feb 11 2019 at 21:10)</a>:</h4>
<p>a library can use a zero-sized type as a kind of "token" that indicates a permission or some such thing, and creating such references "out of thin air" would certainly not be allowed</p>



<a name="158065771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158065771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158065771">(Feb 11 2019 at 21:11)</a>:</h4>
<p>but for your example, I agree with <span class="user-mention" data-user-id="124289">@rkruppe</span>  -- it's the compiler being conservative, mostly. (and also because maintaining pointer equality is nice.) the compiler does not reason about array indices.</p>



<a name="158065793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158065793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158065793">(Feb 11 2019 at 21:11)</a>:</h4>
<p>e.g., you cannot do <code>let x = &amp;mut a[1]; let y = &amp;mut a[2]; *x = 5;</code> even though x and y definitely do <em>not</em> alias</p>



<a name="158065859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158065859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158065859">(Feb 11 2019 at 21:12)</a>:</h4>
<p><span class="user-mention" data-user-id="124289">@rkruppe</span> I'm glad that the rules are a conservative approximation.  I was thinking about other, weirder cases on the way to work yesterday, and I'm not sure how they can be handled, or if they are forever going to be UB.</p>



<a name="158065929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158065929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158065929">(Feb 11 2019 at 21:13)</a>:</h4>
<p>re: the empty set, a reference to a ZST certainly has <em>some</em> information -- namely, it points to a particular address in memory. while it does not alias with anything, that address is still observable and can be significant. we actually fixed iterators over slices of ZSTs to make sure they use a consistent address.</p>



<a name="158065988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158065988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158065988">(Feb 11 2019 at 21:14)</a>:</h4>
<p>the one thing that is empty here is the <em>set of addresses "covered" by the reference</em>. but for that, the fact that all empty sets are equal bears no significance.</p>



<a name="158066340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158066340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158066340">(Feb 11 2019 at 21:20)</a>:</h4>
<p>Once again, I was being unclear.  You're right that the set of addresses covered by the reference is empty, but what I failed to talk more about was exactly what you pointed out; that the existence of the reference could be important.  In which case the 'set of interesting stuff' is not empty, even on such a reference.  If it were empty, then it could be disposed of.</p>



<a name="158066554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158066554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158066554">(Feb 11 2019 at 21:22)</a>:</h4>
<p>more importantly, it could be created arbitrarily</p>



<a name="158066559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158066559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158066559">(Feb 11 2019 at 21:22)</a>:</h4>
<p>(everything in Rust can be disposed of, see <code>mem::forget</code>)</p>



<a name="158066588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158066588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158066588">(Feb 11 2019 at 21:23)</a>:</h4>
<p>Not the kind of 'disposed of' I was thinking about; I meant that the compiler could optimize it away.</p>



<a name="158066611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158066611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158066611">(Feb 11 2019 at 21:23)</a>:</h4>
<p>ah, yes</p>



<a name="158066616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158066616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158066616">(Feb 11 2019 at 21:23)</a>:</h4>
<p>though the compiler can and will optimize many interesting things away :)</p>



<a name="158066678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158066678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158066678">(Feb 11 2019 at 21:24)</a>:</h4>
<p>True, that! :)</p>



<a name="158066684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158066684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158066684">(Feb 11 2019 at 21:24)</a>:</h4>
<p>all this ownership discipline and lifetimes is entirely a compile-time fiction, after all. it is very interesting, and yet entirely "disposed of". ;)</p>



<a name="158066711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping%20mutable%20slices/near/158066711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/overlapping.20mutable.20slices.html#158066711">(Feb 11 2019 at 21:24)</a>:</h4>
<p>That is true.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>